package src.main.BehavioralPatterns.Strategy;

public class Client {
    public static void main(String[] args) {
        OrderProcessor processor = new OrderProcessor();

        // 动态切换支付策略
        processor.setPaymentStrategy(new CreditCardPayment("1122-4654-1234-7498", "546"));
        processor.processOrder(599.56);

        processor.setPaymentStrategy(new AlipayPayment("5648794564"));
        processor.processOrder(52.88);

        processor.setPaymentStrategy(new WechatPayment());
        processor.processOrder(150.55);
    }
}
